Skip to content

fix: pin playwright-go in browser-test scaffold (Starter Templates CI)#53

Merged
monstercameron merged 1 commit into
mainfrom
v4
Jun 29, 2026
Merged

fix: pin playwright-go in browser-test scaffold (Starter Templates CI)#53
monstercameron merged 1 commit into
mainfrom
v4

Conversation

@monstercameron

Copy link
Copy Markdown
Owner

Hotfix for the Starter Templates CI lane after the v4.0.0 merge.

The default starter presets with the browser-tests feature generate a
//go:build playwrightgo smoke test importing playwright-go, but the scaffold
go.mod didn't require it — so go mod tidy tried to discover the version over
the network and fast-failed under GOPROXY=off on CI.

Fix: pin playwright-go (version read from the repo go.mod) in the generated
scaffold go.mod when browser-tests is enabled, so tidy resolves it
deterministically from the seeded go.sum + module cache.

(Deploy Examples To Pages failed separately on a Pages deploy concurrency/infra
race — build-pages succeeded; it self-resolves on the next deploy.)

🤖 Generated with Claude Code

The default starter presets with the browser-tests feature generate a
//go:build playwrightgo smoke test that imports playwright-go, but the
scaffold go.mod did not require it. `go mod tidy` then tried to DISCOVER the
version over the network, which fast-fails under GOPROXY=off (CI), breaking
the Starter Templates lane.

Pin playwright-go in the generated go.mod (version read from the repo's
go.mod) when the browser-tests feature is selected, so tidy resolves it
deterministically from the seeded go.sum + module cache with no network.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@monstercameron monstercameron merged commit a7859d2 into main Jun 29, 2026
15 checks passed
monstercameron pushed a commit that referenced this pull request Jul 6, 2026
A CacheKeyDecorator runs on the fetch hot path, so a decorator that returns
a huge or per-call growing string is a memory/CPU DoS on every request.
DecorateCacheKey now rejects any decorator output over maxDecoratedCacheKeyLen
(8 KiB), keeping the pre-decoration key — rejecting rather than truncating,
since truncating two distinct over-long keys to the same prefix would silently
collide unrelated cache entries. Rejections surface via the reportCacheKeyOverflow
seam instead of being swallowed. Pinned by TestDecorateCacheKeyRejectsOverlongOutput
(negative-verified). Remaining #53 items (per-plugin capability enforcement,
callback timeouts, reentrant-register policy) are owner-level policy decisions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
monstercameron pushed a commit that referenced this pull request Jul 6, 2026
…-approved)

Manifest.Requires is now a per-plugin authorization boundary, not just a
host-wide precondition. While a plugin is inside its Setup call, every Add* it
makes is checked against the capability set it DECLARED in Manifest.Requires:
using a capability that is enabled host-wide but undeclared by this plugin fails
registration (and rolls the plugin back). Declaring a capability is how a plugin
authorizes itself to the matching Add* surface (least privilege). Direct host
configuration outside any Setup has no manifest and keeps only the host-wide
check, so non-plugin use is unaffected.

Implemented via a Setup-scoped active-plugin capability set (beginSetup/endSetup,
bracketed by defer so a Setup panic cannot leak the scope; guarded by stateMu so a
concurrent direct Add* cannot race-read it). All three real example-host plugins
already declare exactly what they use, so nothing in-repo needed migration. New
pin (negative-verified): TestSetupEnforcesDeclaredCapabilities.

Remaining #53 items are genuinely owner-level and deferred: a bounded timeout on
a BLOCKING (non-panicking) plugin callback needs a goroutine+context policy
(what to do on timeout); reentrant Register during Setup cannot be safely
distinguished from a concurrent one without goroutine identity (document as
unsupported); BootstrapData nested-value deep-copy (LOW).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants